﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Deployment.Data.UI.Dialogs.Environment
{
    /// <summary>
    /// Interaction logic for EnvironmentEditorWindow.xaml
    /// </summary>
    public partial class EnvironmentEditorWindow : Window
    {

        public EnvironmentEditorWindow(string environmentFile= null)
        {
            InitializeComponent();
            Data.Environment.EnvironmentsFile envFile = new Data.Environment.EnvironmentsFile();
            if (!string.IsNullOrEmpty(environmentFile))
            {
                envFile = Data.Environment.EnvironmentsFile.LoadFromFile(environmentFile);
            }
            Control.DataContext = envFile;
        }

        public string EnvironmentsFile 
        {
            get { return this.Control.tbl_EnvironmentsFilePath.Text; }
        }

        private void EnvironmentsEditorControl_Loaded(object sender, RoutedEventArgs e)
        {

        }
    }
}
